package com.ny.demo428;

import java.util.Scanner;

public class Test {
    public static  void main(String[] args) {
        double money = 15;
        System.out.println("你需要付款的金额为："+money);
        System.out.println("请选择支付的方式：1.银行卡支付  2.微信支付  3.支付宝支付");
        Scanner scanner = new Scanner(System.in);
        switch (scanner.nextInt()){
            case 1:
                Pay pay = new BankPay();
                pay.text(money);
                break;
            case 2:
                pay = new WeixinPay();
                pay.text(money);
                break;
            case 3:
                pay = new ZhifubaoPay();
                pay.text(money);
                break;



        }
    }
}
